﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Deals.aspx.cs" Inherits="AdminSite.Pages.Deals.Deals" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Deals config
    </h2>
    <hr />
    <div style="margin-top:15px;margin-bottom:20px;">
        <asp:Button ID="btnNewDeal" runat="server" Text="Add New Deal" PostBackUrl="~/Pages/Deals/NewDeal.aspx" />
    </div>
    <h3>Search deals</h3>
    <div style="margin-top:5px;">
        <p style="float:left;padding-left:10px;">All<asp:RadioButton ID="rbAll" 
                runat="server" AutoPostBack="True" GroupName="1" /></p>
        <p style="float:left;padding-left:10px;">Last 6<asp:RadioButton ID="rbLast" 
                runat="server" Checked="true" AutoPostBack="True" GroupName="1" /></p>
        <p style="float:left;padding-left:10px;">Active<asp:RadioButton ID="rbActive" 
                runat="server" AutoPostBack="True" GroupName="1" /></p>
        <p style="float:left;padding-left:10px;">DayDeal<asp:RadioButton ID="rbDayDeal" 
                runat="server" AutoPostBack="True" GroupName="1" /></p>
        <p style="float:left;padding-left:10px;">SideDeal<asp:RadioButton ID="rbSideDeal" 
                runat="server" AutoPostBack="True" GroupName="1" /></p>
        <p style="float:left;padding-left:10px;">Favorite<asp:RadioButton ID="rbFavorite" 
                runat="server" AutoPostBack="True" GroupName="1" /></p>
        <p style="float:left;padding-left:10px;">Available <asp:DropDownList ID="dropAvailable" 
                runat="server" AutoPostBack="True">
                <asp:ListItem Text="True" Value="1" Selected="True"></asp:ListItem>
                <asp:ListItem Text="False" Value="0"></asp:ListItem>
            </asp:DropDownList>
        </p>
        <p style="float:left;padding-left:10px;">By Client <asp:DropDownList ID="dropClient" 
                runat="server" AutoPostBack="True" DataSourceID="EntityDataSourcePartner" 
                DataTextField="NomeNegocio" DataValueField="Id" 
                ondatabound="drop_DataBound">
            </asp:DropDownList>
            <asp:EntityDataSource ID="EntityDataSourcePartner" runat="server" 
                ConnectionString="name=GrupyzEntities" DefaultContainerName="GrupyzEntities" 
                EnableFlattening="False" EntitySetName="Parceiro" 
                Select="it.[Id], it.[NomeNegocio]">
            </asp:EntityDataSource>
        </p>
        <p style="float:left;padding-left:10px;">By City <asp:DropDownList ID="dropCity" 
                runat="server" AutoPostBack="True" DataSourceID="EntityDataSourceCity" 
                DataTextField="Nome" DataValueField="Id" 
                ondatabound="drop_DataBound">
            </asp:DropDownList>
            <asp:EntityDataSource ID="EntityDataSourceCity" runat="server" 
                ConnectionString="name=GrupyzEntities" DefaultContainerName="GrupyzEntities" 
                EnableFlattening="False" EntitySetName="Localidade" 
                Select="it.[Id], it.[Nome]">
            </asp:EntityDataSource>
        </p>
    </div>
    <div class="clear"></div>
    <div style="margin-top:10px;">
        <asp:ListView ID="ListView1" runat="server" 
            DataKeyNames="Id,ArtigoId,QuantidadeMinima,QuantidadeMaxima,PrecoVenda,PrecoDesconto,Descricao,Texto,Data,LocalidadeId,TotalComprado,Expira,Disponivel,ParceiroId,Favorito,DayDeal,SideDeal,CityName,Imagem,ProductName,ProductAvailable" 
            DataSourceID="EntityDataSourceDataList" GroupItemCount="4">
            <AlternatingItemTemplate>
                <td runat="server" style="" width="300px">
                    <asp:Image ID="Image2" runat="server" Height="113px" 
                        ImageUrl='<%# ConfigurationManager.AppSettings["AppDomain"]+Eval("Imagem").ToString().Replace("~","") %>' 
                        Width="172px" />
                    <br />
                    Id:
                    <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                    <br />
                    ArtigoId:
                    <asp:Label ID="ArtigoIdLabel" runat="server" Text='<%# Eval("ArtigoId") %>' />
                    <br />
                    QuantidadeMinima:
                    <asp:Label ID="QuantidadeMinimaLabel" runat="server" 
                        Text='<%# Eval("QuantidadeMinima") %>' />
                    <br />
                    QuantidadeMaxima:
                    <asp:Label ID="QuantidadeMaximaLabel" runat="server" 
                        Text='<%# Eval("QuantidadeMaxima") %>' />
                    <br />
                    PrecoVenda:
                    <asp:Label ID="PrecoVendaLabel" runat="server" 
                        Text='<%# Eval("PrecoVenda") %>' />
                    <br />
                    PrecoDesconto:
                    <asp:Label ID="PrecoDescontoLabel" runat="server" 
                        Text='<%# Eval("PrecoDesconto") %>' />
                    <br />
                    Descricao:
                    <asp:Label ID="DescricaoLabel" runat="server" Text='<%# Eval("Descricao") %>' />
                    <br />
                    Texto:
                    <asp:Label ID="TextoLabel" runat="server" Text='<%# Eval("Texto") %>' />
                    <br />
                    Data:
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("Data") %>' />
                    <br />
                    LocalidadeId:
                    <asp:Label ID="LocalidadeIdLabel" runat="server" 
                        Text='<%# Eval("LocalidadeId") %>' />
                    <br />
                    TotalComprado:
                    <asp:Label ID="TotalCompradoLabel" runat="server" 
                        Text='<%# Eval("TotalComprado") %>' />
                    <br />
                    Expira:
                    <asp:Label ID="ExpiraLabel" runat="server" Text='<%# Eval("Expira") %>' />
                    <br />
                    Disponivel:
                    <asp:Label ID="DisponivelLabel" runat="server" 
                        Text='<%# Eval("Disponivel") %>' />
                    <br />
                    ParceiroId:
                    <asp:Label ID="ParceiroIdLabel" runat="server" 
                        Text='<%# Eval("ParceiroId") %>' />
                    <br />
                    Favorito:
                    <asp:Label ID="FavoritoLabel" runat="server" Text='<%# Eval("Favorito") %>' />
                    <br />
                    DayDeal:
                    <asp:Label ID="DayDealLabel" runat="server" Text='<%# Eval("DayDeal") %>' />
                    <br />
                    SideDeal:
                    <asp:Label ID="SideDealLabel" runat="server" Text='<%# Eval("SideDeal") %>' />
                    <br />
                    CityName:
                    <asp:Label ID="CityNameLabel" runat="server" Text='<%# Eval("CityName") %>' />
                    <br />
                    ProductName:
                    <asp:Label ID="ProductNameLabel" runat="server" 
                        Text='<%# Eval("ProductName") %>' />
                    <br />
                    ProductAvailable:
                    <asp:Label ID="ProductAvailableLabel" runat="server" 
                        Text='<%# Eval("ProductAvailable") %>' />
                    <br />
                    BusinessName:
                    <asp:Label ID="BusinessNameLabel" runat="server" 
                        Text='<%# Eval("BusinessName") %>' />
                    <br />
                    <br />
                    <asp:Button ID="Button1" runat="server" 
                        PostBackUrl='<%# "editdeal.aspx?id=" + Eval("id") %>' Text="Edit Deal" />
                    &nbsp;<asp:Button ID="Button2" runat="server" 
                        PostBackUrl='<%# "editcomments.aspx?id=" + Eval("id") %>' 
                        Text="Edit Comments" />
                    &nbsp;<asp:Button ID="Button3" runat="server" 
                        PostBackUrl='<%# "editorders.aspx?id=" + Eval("id") %>' Text="Orders" />
                    <br />
                </td>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <td runat="server" style="">
                    Id:
                    <asp:Label ID="IdLabel1" runat="server" Text='<%# Eval("Id") %>' />
                    <br />
                    ArtigoId:
                    <asp:Label ID="ArtigoIdLabel1" runat="server" Text='<%# Eval("ArtigoId") %>' />
                    <br />
                    QuantidadeMinima:
                    <asp:Label ID="QuantidadeMinimaLabel1" runat="server" 
                        Text='<%# Eval("QuantidadeMinima") %>' />
                    <br />
                    QuantidadeMaxima:
                    <asp:Label ID="QuantidadeMaximaLabel1" runat="server" 
                        Text='<%# Eval("QuantidadeMaxima") %>' />
                    <br />
                    PrecoVenda:
                    <asp:Label ID="PrecoVendaLabel1" runat="server" 
                        Text='<%# Eval("PrecoVenda") %>' />
                    <br />
                    PrecoDesconto:
                    <asp:Label ID="PrecoDescontoLabel1" runat="server" 
                        Text='<%# Eval("PrecoDesconto") %>' />
                    <br />
                    Descricao:
                    <asp:Label ID="DescricaoLabel1" runat="server" 
                        Text='<%# Eval("Descricao") %>' />
                    <br />
                    Texto:
                    <asp:Label ID="TextoLabel1" runat="server" Text='<%# Eval("Texto") %>' />
                    <br />
                    Data:
                    <asp:Label ID="DataLabel1" runat="server" Text='<%# Eval("Data") %>' />
                    <br />
                    LocalidadeId:
                    <asp:Label ID="LocalidadeIdLabel1" runat="server" 
                        Text='<%# Eval("LocalidadeId") %>' />
                    <br />
                    TotalComprado:
                    <asp:Label ID="TotalCompradoLabel1" runat="server" 
                        Text='<%# Eval("TotalComprado") %>' />
                    <br />
                    Expira:
                    <asp:Label ID="ExpiraLabel1" runat="server" Text='<%# Eval("Expira") %>' />
                    <br />
                    Disponivel:
                    <asp:Label ID="DisponivelLabel1" runat="server" 
                        Text='<%# Eval("Disponivel") %>' />
                    <br />
                    ParceiroId:
                    <asp:Label ID="ParceiroIdLabel1" runat="server" 
                        Text='<%# Eval("ParceiroId") %>' />
                    <br />
                    Favorito:
                    <asp:Label ID="FavoritoLabel1" runat="server" Text='<%# Eval("Favorito") %>' />
                    <br />
                    DayDeal:
                    <asp:Label ID="DayDealLabel1" runat="server" Text='<%# Eval("DayDeal") %>' />
                    <br />
                    SideDeal:
                    <asp:Label ID="SideDealLabel1" runat="server" Text='<%# Eval("SideDeal") %>' />
                    <br />
                    CityName:
                    <asp:Label ID="CityNameLabel1" runat="server" Text='<%# Eval("CityName") %>' />
                    <br />
                    Imagem:
                    <asp:Label ID="ImagemLabel1" runat="server" Text='<%# Eval("Imagem") %>' />
                    <br />
                    ProductName:
                    <asp:Label ID="ProductNameLabel1" runat="server" 
                        Text='<%# Eval("ProductName") %>' />
                    <br />
                    ProductAvailable:
                    <asp:Label ID="ProductAvailableLabel1" runat="server" 
                        Text='<%# Eval("ProductAvailable") %>' />
                    <br />
                    BusinessName:
                    <asp:TextBox ID="BusinessNameTextBox" runat="server" 
                        Text='<%# Bind("BusinessName") %>' />
                    <br />
                    ChangeTracker:
                    <asp:TextBox ID="ChangeTrackerTextBox" runat="server" 
                        Text='<%# Bind("ChangeTracker") %>' />
                    <br />
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                        Text="Update" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Cancel" />
                    <br />
                </td>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" style="">
                    <tr>
                        <td>
                            No data was returned.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
                <td runat="server" />
            </EmptyItemTemplate>
            <GroupTemplate>
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <InsertItemTemplate>
                <td runat="server" style="">
                    Id:
                    <asp:TextBox ID="IdTextBox" runat="server" Text='<%# Bind("Id") %>' />
                    <br />
                    ArtigoId:
                    <asp:TextBox ID="ArtigoIdTextBox" runat="server" 
                        Text='<%# Bind("ArtigoId") %>' />
                    <br />
                    QuantidadeMinima:
                    <asp:TextBox ID="QuantidadeMinimaTextBox" runat="server" 
                        Text='<%# Bind("QuantidadeMinima") %>' />
                    <br />
                    QuantidadeMaxima:
                    <asp:TextBox ID="QuantidadeMaximaTextBox" runat="server" 
                        Text='<%# Bind("QuantidadeMaxima") %>' />
                    <br />
                    PrecoVenda:
                    <asp:TextBox ID="PrecoVendaTextBox" runat="server" 
                        Text='<%# Bind("PrecoVenda") %>' />
                    <br />
                    PrecoDesconto:
                    <asp:TextBox ID="PrecoDescontoTextBox" runat="server" 
                        Text='<%# Bind("PrecoDesconto") %>' />
                    <br />
                    Descricao:
                    <asp:TextBox ID="DescricaoTextBox" runat="server" 
                        Text='<%# Bind("Descricao") %>' />
                    <br />
                    Texto:
                    <asp:TextBox ID="TextoTextBox" runat="server" Text='<%# Bind("Texto") %>' />
                    <br />
                    Data:
                    <asp:TextBox ID="DataTextBox" runat="server" Text='<%# Bind("Data") %>' />
                    <br />
                    LocalidadeId:
                    <asp:TextBox ID="LocalidadeIdTextBox" runat="server" 
                        Text='<%# Bind("LocalidadeId") %>' />
                    <br />
                    TotalComprado:
                    <asp:TextBox ID="TotalCompradoTextBox" runat="server" 
                        Text='<%# Bind("TotalComprado") %>' />
                    <br />
                    Expira:
                    <asp:TextBox ID="ExpiraTextBox" runat="server" Text='<%# Bind("Expira") %>' />
                    <br />
                    Disponivel:
                    <asp:TextBox ID="DisponivelTextBox" runat="server" 
                        Text='<%# Bind("Disponivel") %>' />
                    <br />
                    ParceiroId:
                    <asp:TextBox ID="ParceiroIdTextBox" runat="server" 
                        Text='<%# Bind("ParceiroId") %>' />
                    <br />
                    Favorito:
                    <asp:TextBox ID="FavoritoTextBox" runat="server" 
                        Text='<%# Bind("Favorito") %>' />
                    <br />
                    DayDeal:
                    <asp:TextBox ID="DayDealTextBox" runat="server" Text='<%# Bind("DayDeal") %>' />
                    <br />
                    SideDeal:
                    <asp:TextBox ID="SideDealTextBox" runat="server" 
                        Text='<%# Bind("SideDeal") %>' />
                    <br />
                    CityName:
                    <asp:TextBox ID="CityNameTextBox" runat="server" 
                        Text='<%# Bind("CityName") %>' />
                    <br />
                    Imagem:
                    <asp:TextBox ID="ImagemTextBox" runat="server" Text='<%# Bind("Imagem") %>' />
                    <br />
                    ProductName:
                    <asp:TextBox ID="ProductNameTextBox" runat="server" 
                        Text='<%# Bind("ProductName") %>' />
                    <br />
                    ProductAvailable:
                    <asp:TextBox ID="ProductAvailableTextBox" runat="server" 
                        Text='<%# Bind("ProductAvailable") %>' />
                    <br />
                    BusinessName:
                    <asp:TextBox ID="BusinessNameTextBox" runat="server" 
                        Text='<%# Bind("BusinessName") %>' />
                    <br />
                    ChangeTracker:
                    <asp:TextBox ID="ChangeTrackerTextBox" runat="server" 
                        Text='<%# Bind("ChangeTracker") %>' />
                    <br />
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                        Text="Insert" />
                    <br />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                        Text="Clear" />
                    <br />
                </td>
            </InsertItemTemplate>
            <ItemTemplate>
                <td runat="server" style="" width="300px">
                    <asp:Image ID="Image1" runat="server" Height="113px" 
                        ImageUrl='<%# ConfigurationManager.AppSettings["AppDomain"]+Eval("Imagem").ToString().Replace("~","") %>' 
                        Width="172px" />
                    <br />
                    Id:
                    <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                    <br />
                    ArtigoId:
                    <asp:Label ID="ArtigoIdLabel" runat="server" Text='<%# Eval("ArtigoId") %>' />
                    <br />
                    QuantidadeMinima:
                    <asp:Label ID="QuantidadeMinimaLabel" runat="server" 
                        Text='<%# Eval("QuantidadeMinima") %>' />
                    <br />
                    QuantidadeMaxima:
                    <asp:Label ID="QuantidadeMaximaLabel" runat="server" 
                        Text='<%# Eval("QuantidadeMaxima") %>' />
                    <br />
                    PrecoVenda:
                    <asp:Label ID="PrecoVendaLabel" runat="server" 
                        Text='<%# Eval("PrecoVenda") %>' />
                    <br />
                    PrecoDesconto:
                    <asp:Label ID="PrecoDescontoLabel" runat="server" 
                        Text='<%# Eval("PrecoDesconto") %>' />
                    <br />
                    Descricao:
                    <asp:Label ID="DescricaoLabel" runat="server" Text='<%# Eval("Descricao") %>' />
                    <br />
                    Texto:
                    <asp:Label ID="TextoLabel" runat="server" Text='<%# Eval("Texto") %>' />
                    <br />
                    Data:
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("Data") %>' />
                    <br />
                    LocalidadeId:
                    <asp:Label ID="LocalidadeIdLabel" runat="server" 
                        Text='<%# Eval("LocalidadeId") %>' />
                    <br />
                    TotalComprado:
                    <asp:Label ID="TotalCompradoLabel" runat="server" 
                        Text='<%# Eval("TotalComprado") %>' />
                    <br />
                    Expira:
                    <asp:Label ID="ExpiraLabel" runat="server" Text='<%# Eval("Expira") %>' />
                    <br />
                    Disponivel:
                    <asp:Label ID="DisponivelLabel" runat="server" 
                        Text='<%# Eval("Disponivel") %>' />
                    <br />
                    ParceiroId:
                    <asp:Label ID="ParceiroIdLabel" runat="server" 
                        Text='<%# Eval("ParceiroId") %>' />
                    <br />
                    Favorito:
                    <asp:Label ID="FavoritoLabel" runat="server" Text='<%# Eval("Favorito") %>' />
                    <br />
                    DayDeal:
                    <asp:Label ID="DayDealLabel" runat="server" Text='<%# Eval("DayDeal") %>' />
                    <br />
                    SideDeal:
                    <asp:Label ID="SideDealLabel" runat="server" Text='<%# Eval("SideDeal") %>' />
                    <br />
                    CityName:
                    <asp:Label ID="CityNameLabel" runat="server" Text='<%# Eval("CityName") %>' />
                    <br />
                    ProductName:
                    <asp:Label ID="ProductNameLabel" runat="server" 
                        Text='<%# Eval("ProductName") %>' />
                    <br />
                    ProductAvailable:
                    <asp:Label ID="ProductAvailableLabel" runat="server" 
                        Text='<%# Eval("ProductAvailable") %>' />
                    <br />
                    BusinessName:
                    <asp:Label ID="BusinessNameLabel" runat="server" 
                        Text='<%# Eval("BusinessName") %>' />
                    <br />
                    <br />
                    <asp:Button ID="Button1" runat="server" 
                        PostBackUrl='<%# "editdeal.aspx?id=" + Eval("id") %>' Text="Edit Deal" />
                    &nbsp;<asp:Button ID="Button2" runat="server" 
                        PostBackUrl='<%# "editcomments.aspx?id=" + Eval("id") %>' 
                        Text="Edit Comments" />
                    &nbsp;<asp:Button ID="Button3" runat="server" 
                        PostBackUrl='<%# "editorders.aspx?id=" + Eval("id") %>' Text="Orders" />
                    <br />
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="groupPlaceholderContainer" runat="server" border="0" style="">
                                <tr ID="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" style="">
                            <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    <asp:NumericPagerField />
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <td runat="server" style="">
                    Id:
                    <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                    <br />
                    ArtigoId:
                    <asp:Label ID="ArtigoIdLabel" runat="server" Text='<%# Eval("ArtigoId") %>' />
                    <br />
                    QuantidadeMinima:
                    <asp:Label ID="QuantidadeMinimaLabel" runat="server" 
                        Text='<%# Eval("QuantidadeMinima") %>' />
                    <br />
                    QuantidadeMaxima:
                    <asp:Label ID="QuantidadeMaximaLabel" runat="server" 
                        Text='<%# Eval("QuantidadeMaxima") %>' />
                    <br />
                    PrecoVenda:
                    <asp:Label ID="PrecoVendaLabel" runat="server" 
                        Text='<%# Eval("PrecoVenda") %>' />
                    <br />
                    PrecoDesconto:
                    <asp:Label ID="PrecoDescontoLabel" runat="server" 
                        Text='<%# Eval("PrecoDesconto") %>' />
                    <br />
                    Descricao:
                    <asp:Label ID="DescricaoLabel" runat="server" Text='<%# Eval("Descricao") %>' />
                    <br />
                    Texto:
                    <asp:Label ID="TextoLabel" runat="server" Text='<%# Eval("Texto") %>' />
                    <br />
                    Data:
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("Data") %>' />
                    <br />
                    LocalidadeId:
                    <asp:Label ID="LocalidadeIdLabel" runat="server" 
                        Text='<%# Eval("LocalidadeId") %>' />
                    <br />
                    TotalComprado:
                    <asp:Label ID="TotalCompradoLabel" runat="server" 
                        Text='<%# Eval("TotalComprado") %>' />
                    <br />
                    Expira:
                    <asp:Label ID="ExpiraLabel" runat="server" Text='<%# Eval("Expira") %>' />
                    <br />
                    Disponivel:
                    <asp:Label ID="DisponivelLabel" runat="server" 
                        Text='<%# Eval("Disponivel") %>' />
                    <br />
                    ParceiroId:
                    <asp:Label ID="ParceiroIdLabel" runat="server" 
                        Text='<%# Eval("ParceiroId") %>' />
                    <br />
                    Favorito:
                    <asp:Label ID="FavoritoLabel" runat="server" Text='<%# Eval("Favorito") %>' />
                    <br />
                    DayDeal:
                    <asp:Label ID="DayDealLabel" runat="server" Text='<%# Eval("DayDeal") %>' />
                    <br />
                    SideDeal:
                    <asp:Label ID="SideDealLabel" runat="server" Text='<%# Eval("SideDeal") %>' />
                    <br />
                    CityName:
                    <asp:Label ID="CityNameLabel" runat="server" Text='<%# Eval("CityName") %>' />
                    <br />
                    Imagem:
                    <asp:Label ID="ImagemLabel" runat="server" Text='<%# Eval("Imagem") %>' />
                    <br />
                    ProductName:
                    <asp:Label ID="ProductNameLabel" runat="server" 
                        Text='<%# Eval("ProductName") %>' />
                    <br />
                    ProductAvailable:
                    <asp:Label ID="ProductAvailableLabel" runat="server" 
                        Text='<%# Eval("ProductAvailable") %>' />
                    <br />
                    BusinessName:
                    <asp:Label ID="BusinessNameLabel" runat="server" 
                        Text='<%# Eval("BusinessName") %>' />
                    <br />
                </td>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:EntityDataSource ID="EntityDataSourceDataList" runat="server" 
            ConnectionString="name=GrupyzEntities" 
            DefaultContainerName="GrupyzEntities" EnableFlattening="False" 
            EntitySetName="DealView" 
            Where="(it.parceiroid = @parceiroid or @parceiroid is null) and (it.localidadeid = @localid or @localid is null )">
            <WhereParameters>
                <asp:ControlParameter ControlID="dropClient" DbType="Int32" Name="parceiroid" 
                    PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="dropCity" DbType="Int32" Name="localid" 
                    PropertyName="SelectedValue" />
            </WhereParameters>
        </asp:EntityDataSource>
        
    </div>
</asp:Content>
